package com.honour.busserver.backup.controller;

import com.honour.busserver.backup.base.ResultMsg;
import com.honour.busserver.backup.entity.BusBackConfig;
import com.honour.busserver.backup.service.BusBackConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("taskConfig")
@CrossOrigin
public class TaskConfigController {
    @Autowired
    private BusBackConfigService busBackConfigService;

    @PostMapping("update")
    public ResultMsg updateOrAddConfig(@RequestBody BusBackConfig busBackConfig){
        return busBackConfigService.updateOrAddConfig(busBackConfig);
    }
}
